<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./js/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <img src="http://pkbivgfrm.bkt.clouddn.com/1066370498633486336?t=1545812322518" onerror="imgerrorfun();" alt="" />
    </div>

    <script>
      // let IMG = new Image()
      // // IMG.src = 'http://pkbivgfrm.bkt.clouddn.com/1066370498633486336?t=1545812322518'
      // IMG.src = 'http://touxiang-1313393876.cos.ap-nanjing.myqcloud.com/dalh.jpg'

      // IMG.onerror = () => {
      //   console.log('图片失败')
      // }
      // let imgs = document.getElementsByTagName('img')[0]
      // imgs.onerror = function () {
      //   console.log('图片失败')
      // }

      // window.onload = function () {
      //   let imgs = document.getElementsByTagName('img')
      //   console.log('imgs:', imgs)
      //   imgs.onerror = function () {
      //     console.log('图片失败')
      //   }
      // }

      function imgerrorfun() {
        // console.log('图片失败')
      }

      // const obj = {
      //   sname: 'kky',
      //   age: 18,
      // }
      // const res = Object.keys(obj)
      // console.log('REs:', res)
    </script>
  </body>
</html>
